<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>舱次位置-frame</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <style>
        [v-cloak] {
            display: none;
        }

        .expend-cabin-wrapper>span {
            display: inline-block;
            font-size: 14px;
        }

        .aui-btn-info.add-cabin-info-btn {
            position: fixed;
            right: 1.2rem;
            top: 1rem;
            z-index: 100;
        }

        .cabin-info {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1000;
            height: 100%;
            width: 100%;
            background-color: rgba(255, 255, 255, 1);
            padding-top: 170px;
        }

        .add-cabin-info {
            width: 100%;
        }

        .aui-btn-sm {
            width: 300px;
            margin: 20px auto;
        }

        .aui-list-item.aui-list-item-middle {
            width: 90%;
            margin: 0 auto;
            border-radius: 10px;
            -moz-box-shadow: 1px 4px 20px #C2C2C2;
            -webkit-box-shadow: 1px 4px 20px #C2C2C2;
            box-shadow: 1px 4px 20px #C2C2C2;
            margin-top: 20px;
        }

        /* .aui-list-item h3 {
            text-align: center;
            padding-top: 0.8rem;
            
        } */

        .aui-list-item-text {
            margin-top: 5px;
            display: -webkit-flex;
            display: flex;
            justify-content: flex-start;
            align-items: center;
        }

        .new-list-item span {
            color: #84c1ff;
            font-size: 14px;
            flex: 1;
            display: block;
            height: 23px;
            line-height: 23px;
        }

        .aui-btn-sm {
            width: 300px;
            margin: 20px auto;
        }

        .aui-card-list-content {
            background-color: #f5f5f5;
            outline: none;
            border: none;
            border: 0;
        }

        /* 治疗次数 */
        .text-header {
            width: 95%;
            font-size: 30px;
            font-weight: bold;
            padding: 1.6rem 1rem;
        }

        /* 排仓信息 */
        .text-body {
            width: 95%;
            margin: 0 auto;
            display: -webkit-flex;
            display: flex;
            justify-content: flex-start;
            align-items: center;
        }

        .text-body>div:nth-child(1) {
            width: 80%;
            padding-left: 30px;
        }

        .text-body>div:nth-child(2) {
            width: 20%;
            color: skyblue;
        }

        .text-body>div>p:nth-child(1) {
            color: #000;
        }

        .text-body>div>p:nth-child(2) {
            font-size: 17px;
            color: #777;
        }

        .aui-list-img-sm {
            width: 3.6rem;
            height: 4.2rem;
            border-radius: 50%;
        }

        .aui-list.aui-media-list::before {
            display: none !important;
        }

        .aui-form-list {
            position: relative;
        }

        .aui-list-item-form {
            position: absolute;
            width: 60%;
            left: 50%;
            transform: translateX(-50%);
        }

        .aui-list-cender {
            width: 54%;
        }

        .aui-list-cender span {
            padding-right: 30%;
            width: 100%
        }

        /* 新的列表样式 */
        .list-header {
            display: flex;
            justify-content: space-around;
            padding: 0.6rem 0 0.2rem;
            align-items: center;
        }

        .list-header-right {
            color: #999;
            font-size: 0.7rem;
        }

        .list-header-center {
            color: #999;
            font-size: 0.7rem;
        }

        .list-content {
            display: flex;
            justify-content: space-between;
        }

        .list-content-left {
            width: 20%;
        }

        .list-content-right {
            flex: 1;
            text-align: left;
            padding-left: 0.8rem;
            color: #333;
        }

        .btn-border {
            border: 1px solid #4169E1;
            padding: 0.1rem 0.2rem;
            border-radius: 0.2rem;
            margin-top: 0.2rem;
            font-size: 0.6rem;
        }

        .list-content-time {
            font-size: 0.6rem;
        }

        .list-content-time span {
            margin-left: 0.4rem;
            color: #555;
        }
    </style>
</head>

<body>
    <main id="app">
        <div class="text-header">
            舱次信息
        </div>
        <div class="cabin-info" id="cabinStatus">
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list">

                    <li class="aui-list-item aui-list-item-form">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                位置名称
                            </div>
                            <div class="aui-list-item-input">
                                <input style="padding-left:30%" type="text" placeholder="位置名称" id="cfpName">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item aui-list-item-form">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                位置类型
                            </div>
                            <div class="aui-list-item-input">
                                <input style="padding-left:30%" type="text" placeholder="位置类型" id="cfpType">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item aui-list-item-form">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                别名代码
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" style="padding-left:30%" id="cfpAlias" placeholder="别名代码">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item aui-list-item-form">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                排序编号
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" style="padding-left:30%" id="cfpSort" placeholder="排序编号">
                            </div>
                        </div>
                    </li>
                </ul>
                <p class="add-cabin-info">
                <div class="aui-bar aui-bar-btn aui-bar-btn-round aui-btn-sm" style="width:45%;">
                    <div class="aui-bar-btn-item aui-active" onclick="Cancel()">取消</div>
                    <div class="aui-bar-btn-item" onclick="insertHoCabinFrequencyPosition()">添加</div>
                </div>
                </p>
            </div>
        </div>
    </main>
</body>

</html>

<script src="../script/api.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/vue.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/jquery.min.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/ToConfigure.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-toast.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-dialog.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-tab.js" charset="utf-8" type="text/javascript"></script>
<!-- <script src="../script/aui.picker.js"></script> -->
<script type="text/javascript">
 var vm;
    apiready = function () {
        vm = new Vue({
            el: '#app',
            data: {
                getDateTime: '选择日期'
            },
            watch: {
                searchInfo: function () { }
            },
            methods: {

            }
        })
    }

    /**
   * 添加舱次信息
   */
    function insertHoCabinFrequencyPosition() {
        //定义toast提示框
        var toast = new auiToast();
        /**
         * 获取参数
         */
        var jsonStr = GetParameters();
        //获取所属医院IP地址
        var Url_IP = ToConfigure_IP("Gorgeous");

        /**
         * 验证参数是否为空
         */
        if (jsonStr) {
            /**
             * 请求控制器
             */
            $.ajax({
                url: Url_IP + '/disinfectioninspection/hocabinfrequencyposition/insertHoCabinFrequencyPosition',
                type: 'post',
                async: false,
                contentType: "application/json",
                dataType: "json",
                data: jsonStr,
                success: function (result) {
                    /**
                     * 验证是否成功
                     */
                    if (result.success == true) {

                        toast.success({
                            title: "提交成功",
                            duration: 2000
                        });
                        api.openFrame({ // 打开Frame
                            name: 'cabin',
                            url: 'yangcangzhiliao-frame.html',
                        });


                    } else {
                        /**
                         *  提示错误信息
                         */
                        toast.fail({
                            title: "提交失败",
                            duration: 2000
                        });
                    }
                },
                error: function (result) {
                    /**
                     *  提示错误信息
                     */
                    toast.fail({
                        title: "提交失败",
                        duration: 2000
                    });
                }
            });
        }
    }
    //获取添加舱室信息
    function GetParameters() {
        var JsParms = new Object();
        //舱次名称
        JsParms.cfpId = $("#cfpId").val();
        //舱室
        JsParms.cfpCfId =api.pageParam.cfId;
        //加压时间
        JsParms.cfpName = $("#cfpName").val();
        //减压时间
        JsParms.cfpType = $("#cfpType").val();
        //稳压时间
        JsParms.cfpAlias = $("#cfpAlias").val();
        //出舱时间
        JsParms.cfpSort = $("#cfpSort").val();
        return JSON.stringify(JsParms);
    }

    //调用刷新当前页面
    function reloadCanbin() {
        window.location.reload();
    }


</script>